﻿using FLH.Regions;
using MyFloridaHouse.libSvDTO;
using System.Collections.Generic;
using System.Linq;

namespace MyFloridaHouse.DataAccess.ExtensionsTS
{
    public static class ConvertRegionsModelToRegionDTO
    {
        public static List<RegionDTO> convertList(List<RegionsModel> itemList)
        {
            return itemList.Select(item => ConvertRegionsModelToRegionDTO.DataContract(item)).ToList();
        }

        public static RegionDTO DataContract(RegionsModel item)
        {
            return new RegionDTO
            {
                regionID = item.RegionID,
                centerLatY = item.CenterLatY,
                centerLngX = item.CenterLngX,
                //TODO: Need to include RegionDTO mapMultiShapeDTO  in conversion to RegionsModel (probably store it as a serialized,compressed byte array)
                
            
            };
        }
    }
}